/**
 * 
 */
package de.oszimtcc.timetablecore;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import de.oszimtcc.timetable.R;
import de.oszimtcc.timetable.TimetableApplication;


/**
 * @author Kooki
 *
 */
public class Day implements Iterable<Block>,Serializable
{
	public List<Block> BlockList = new ArrayList<Block>();
	
	private int blockAmount;
	private int dayIndex;
	private String dayName;
	private Date dayDate;
	
	public Day(int pDayNumber,Date pDate)
	{
		this.dayIndex = pDayNumber;
		this.dayName = TimetableApplication.getInstance().getResources().getStringArray(R.array.Wochentage)[this.dayIndex].toString();
		this.dayDate = pDate;
	}

	/**
	 * @return the dayIndex
	 */
	public int getDayIndex()
	{
		return dayIndex;
	}

	/**
	 * @return the dayName
	 */
	public String getDayName()
	{
		return dayName;
	}

	/**
	 * @return the dayDate
	 */
	public Date getDayDate()
	{
		return dayDate;
	}

	/**
	 * @return the blockAmount
	 */
	public int GetBlockAmount()
	{
		return BlockList.size();
	}

	@Override
    public Iterator<Block> iterator()
    {
	    return BlockList.iterator();
    }	
}
